﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace DoAn
{
    public partial class frmMenu : Form
    {
        SqlConnection con;
        SqlCommand cmd;
        SqlDataAdapter da;
        DataSet ds;
        SqlCommandBuilder cmb; 
        public frmMenu()
        {
            String conStr = ConfigurationManager.ConnectionStrings["conStr"].ConnectionString;
            con = new SqlConnection(conStr);
            con.ConnectionString = conStr;
            InitializeComponent();
        }

        private void bảngTỷLệLToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void xemDanhSachHợpĐôngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHopdongvayvon objfrmHopdongvayvon = new frmHopdongvayvon();
            objfrmHopdongvayvon.ShowDialog();
        }

        private void hợpĐồngVayVốnToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void statusStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void xemDanhSáchNhânViênToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDanhsachnhanvien objfrmDanhsachnhanvien = new frmDanhsachnhanvien();
           
            objfrmDanhsachnhanvien.ShowDialog();
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void frmMenu_Load(object sender, EventArgs e)
        {

        }
        private void AdminEnableMenu(object sender, EventArgs e)
        {
            quảnLýNgườiDùngToolStripMenuItem.Enabled = true;
            xemDanhSáchNhânViênToolStripMenuItem.Enabled = true;
        }
        private void AdminDisableMenu(object sender, EventArgs e)
        {
            quảnLýNgườiDùngToolStripMenuItem.Enabled = false;
            xemDanhSáchNhânViênToolStripMenuItem.Enabled = false;
        }
        private void quảnLýNhânViênToolStripMenuItem_Click(object sender, EventArgs e)
        {
            quảnLýNhânViênToolStripMenuItem.Enabled = true;
        }

        private void hìnhThứcVayToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHinhthucvay objfrmHinhthucvay = new frmHinhthucvay();
            objfrmHinhthucvay.ShowDialog();
        }

        private void quảnLýNgườiDùngToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }
        private void button3_Click(object sender, EventArgs e)
        {
            frmDangNhap objfrmDangNhap = new frmDangNhap();
           
            objfrmDangNhap.ShowDialog();
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có muốn thoát hay không  ", "Thông Báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) == DialogResult.OK)
            {
                this.Close();
            } 
        }

        private void xemDanhSáchKháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDanhsachkhachhang objfrmDanhsachkhachhang = new frmDanhsachkhachhang();
            objfrmDanhsachkhachhang.ShowDialog();
        }

        private void tỷLệLãiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTylelai objfrmTylelai = new frmTylelai();
            objfrmTylelai.ShowDialog();
        }

        private void danhSáchĐếnHạnTrãLãiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTralai objfrmTralai = new frmTralai();
            objfrmTralai.ShowDialog();
        }

        private void danhSáchKháchHàngBịPhạtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPhat objfrmPhat = new frmPhat();
            objfrmPhat.ShowDialog();
        }

        private void mứcPhạtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmMucphat objfrmMucphat = new frmMucphat();
            objfrmMucphat.ShowDialog();
        }
    }
}
